

const routes = [
  { 
    name: 'index',
    path: '/index', 
    // 使用动态import语法实现“路由懒加载”，
    // 一个特殊的注释语法来提供 chunk name
    component: () => import(/* webpackChunkName: "index" */ '../views/index.vue')
  },
  { 
    name: 'counter',
    path: '/counter', 
    component: () => import(/* webpackChunkName: "counter" */ '../views/counter.vue')
  },
  // 404页面的路由配置必须放在最后
  { 
    name: '404',
    path: '*', 
    component: () => import(/* webpackChunkName: "index" */ '../views/index.vue')
  }
]

export default routes